<!doctype html>
<html lang="en" xmlns:th="www.thymeleaf.org">
<head>
	<meta charset="utf-8" />
	<link rel="icon" type="image/png" href="assets/img/favicon.ico">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

	<title></title>

	<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
    <meta name="viewport" content="width=device-width" />


    <!-- Bootstrap core CSS     -->
    <link href="assets/css/bootstrap.min.css" rel="stylesheet" />

    <!-- Animation library for notifications   -->
    <link href="assets/css/animate.min.css" rel="stylesheet"/>

    <!--  Light Bootstrap Table core CSS    -->
    <link href="assets/css/light-bootstrap-dashboard.css" rel="stylesheet"/>


    <!--  CSS for Demo Purpose, don't include it in your project     -->
    <link href="assets/css/demo.css" rel="stylesheet" />


    <!--     Fonts and icons     -->
    <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
    <link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300' rel='stylesheet' type='text/css'>
    <link href="assets/css/pe-icon-7-stroke.css" rel="stylesheet" />
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入VUE库 -->
    <script src="http://lib.baomitu.com/vue/2.6.12/vue.min.js"></script>
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script src="assets/js/axios.min.js"></script>
</head>
<body>
<div id="app">
<div class="wrapper">
    <div class="sidebar" data-color="purple" data-image="assets/img/sidebar-5.jpg">

    <!--

        Tip 1: you can change the color of the sidebar using: data-color="blue | azure | green | orange | red | purple"
        Tip 2: you can also add an image using data-image tag

    -->

    	<div class="sidebar-wrapper">
            <div class="logo">
                <a href="#" class="simple-text">
                    餐厅后台管理
                </a>
            </div>

            <ul th:replace="admin::admin001">
            </ul>
    	</div>
    </div>

    <div class="main-panel">
        <nav class="navbar navbar-default navbar-fixed">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navigation-example-2">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="#">字段查询</a>
                </div>
                <div th:replace="admin::admin002">
                </div>
            </div>
        </nav>


        <div class="content">
            <div class="container-fluid">
                <div class="card">
                    <div class="header">
                        <h4 class="title">用户查询</h4>
                        <p class="category">= =</p>
                    </div>
                    <form :inline="true">
                    <div class="col-md-3">
                        <div class="form-group">
                            <label>Username</label>
                            <input type="text" class="form-control" name="name" placeholder="Username"  v-model="name">
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label>Id</label>
                            <input type="text" class="form-control" name="id" placeholder="Id" v-model="id">
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label>Account</label>
                            <input type="text" class="form-control" name="account" placeholder="Account" v-model="account">
                        </div>
                    </div>
                            <button target="_blank" type="submit" class="btn btn-round btn-fill btn-info" style="margin: 30px auto auto 10px" @click.prevent="query()">查询</button>
                        </form>
                    <div class="content table-responsive table-full-width">
                        <table class="table table-hover table-striped">
                            <thead>
                            <th>编号</th>
                            <th>姓名</th>
                            <th>账号</th>
                            <th>密码</th>
                            <th>电话</th>
                            <th>邮箱</th>
                            <th>地址</th>
                            </thead>
                            <tbody>
                            <div>
                                <tr  v-for="f in all">
                                    <td>{{f.id}}</td>
                                    <td>{{f.name}}</td>
                                    <td>{{f.account}}</td>
                                    <td>{{f.password}}</td>
                                    <td>{{f.phone}}</td>
                                    <td>{{f.email}}</td>
                                    <td>{{f.address}}</td>
                                </tr>
                            </div>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="container-fluid">
                <div class="card">
                    <div class="header">
                        <h4 class="title">菜品查询</h4>
                        <p class="category">= =</p>
                    </div>
                    <form :inline="true">
                        <div class="col-md-3">
                            <div class="form-group">
                                <label>Foodname</label>
                                <input type="text" class="form-control" name="fname" placeholder="Foodname"  v-model="fname">
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="form-group">
                                <label>Id</label>
                                <input type="text" class="form-control" name="fid" placeholder="Id" v-model="fid">
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="form-group">
                                <label>Type</label>
                                <input type="text" class="form-control" name="ftype" placeholder="type" v-model="ftype">
                            </div>
                        </div>
                        <button target="_blank" type="submit" class="btn btn-round btn-fill btn-info" style="margin: 30px auto auto 10px" @click.prevent="queryf()">查询</button>
                    </form>
                    <div class="content table-responsive table-full-width">
                        <table class="table table-hover table-striped">
                            <thead>
                            <th>编号</th>
                            <th>名称</th>
                            <th>价格</th>
                            <th>类型</th>
                            <th>备注</th>
                            <th>图片</th>
                            </thead>
                            <tbody>
                            <div>
                                <tr  v-for="fo in allf">
                                    <td>{{fo.fid}}</td>
                                    <td>{{fo.fname}}</td>
                                    <td>{{fo.price}}</td>
                                    <td>{{fo.ftype}}</td>
                                    <td>{{fo.fdesc}}</td>
                                    <td><img :src="`../assets/img/${fo.image}`" alt="" width="70px" height="70px"></td>
                                </tr>
                            </div>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>


        <footer class="footer">
            <div class="container-fluid">
                <nav class="pull-left">
                    <ul>
                        <li>
                            <a href="">
                                Home
                            </a>
                        </li>
                        <li>
                            <a href="">
                                Company
                            </a>
                        </li>
                        <li>
                            <a href="">
                                Portfolio
                            </a>
                        </li>
                        <li>
                            <a href="">
                               Blog
                            </a>
                        </li>
                    </ul>
                </nav>
                <p class="copyright pull-right">
                    Copyright ©2022 版权所有 湘公网安备1101080209224 湘 ICP证 100714号
                </p>
            </div>
        </footer>

    </div>
</div>
</div>
<script>
    var v = new Vue({
        el : "#app",
        data : {
            id : "",
            name : "",
            account : "",
            fname : "",
            fid : "",
            ftype : "",
            fo : {},
            allf : [],
            f : {},
            all : []
        },
        methods : {
            query(){
                let url ="upgrade/query.s";
                let params = new URLSearchParams();
                params.append("id",this.id);
                params.append("name",this.name);
                params.append("account",this.account);
                axios.post(url,params).then(res=>{
                    this.all=res.data.data;
                })

                // if(this.id!=null){
                //     url += "id=" + this.id;
                // }
                // if(this.name!=null){
                //     url += "name=" + this.name;
                // }
                // if(this.account!=null){
                //     url += "account=" + this.account;
                // }
                // axios.get(url).then(res => {
                //         this.all = res.data;
                // })
            },
            queryf(){
                let url ="upgrade/queryf.s";
                let params = new URLSearchParams();
                params.append("fid",this.fid);
                params.append("fname",this.fname);
                params.append("ftype",this.ftype);
                axios.post(url,params).then(res=>{
                    this.allf=res.data.data;
                })

            }
        }
    })
</script>


</body>

    <!--   Core JS Files   -->
    <script src="assets/js/jquery-1.10.2.js" type="text/javascript"></script>
	<script src="assets/js/bootstrap.min.js" type="text/javascript"></script>

	<!--  Checkbox, Radio & Switch Plugins -->
	<script src="assets/js/bootstrap-checkbox-radio-switch.js"></script>

	<!--  Charts Plugin -->
	<script src="assets/js/chartist.min.js"></script>

    <!--  Notifications Plugin    -->
    <script src="assets/js/bootstrap-notify.js"></script>

    <!--  Google Maps Plugin    -->
    <!---<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>--->

    <!-- Light Bootstrap Table Core javascript and methods for Demo purpose -->
	<script src="assets/js/light-bootstrap-dashboard.js"></script>

	<!-- Light Bootstrap Table DEMO methods, don't include it in your project! -->
	<script src="assets/js/demo.js"></script>

</html>
